The Gamemode 4 Standard
(Not to be confused by the Game Standard). This page defines the Gamemode 4 Standard - a set of standard rules that Gamemode 4 modules should follow to make them efficient and compatible as well as standardised in shape and behaviour. None of the 1.8 modules meet this standard, rather the modules released for 1.9 are being updated to 2.0 versions. For current 1.9 Module Updates, including a changelog, visit the page here. Scoreboards Scoreboards should start with "GM4_" to denote that it belongs to the GM4 group and be capitalised using camelCase. Try to make objective names unique and descriptive but short if possible. Where appropriate, modules should use tags instead of scoreboards to store info. Global Scoreboards There are a few scoreboards that are "global" scoreboards. They can be used for counting, junk storage and soforth. Modules using them should still try to add them on install. Modules may NOT reset all entities on, or remove these scoreboards. '''Global scoreboards should only be used for marker entities specific to one module '''unless they are read-only like armor or health. To avoid overwriting other modules using the same scoreboard. Values When using objectives to save IDs modules should stick to existing numbers if possible. For instance every potion related ID should be matching the potion IDs provided by the Liquid Tanks Module. Used Scoreboards This table lists all the scoreboards, which module they belong to and their type. Only lists 2.0 version modules conforming to the standard. Identifier All modules should have an "identifier" armorstand placed at the negative-most point of the square space the module occupies. It should be named using the module name with camelCase and GM4_ prefix e.g. GM4_desireLines. NoGravity should be true and the entity should contain a version number tag and a GM4 tag. Below is an example tag. NOTE that 2_0 uses an underscore not a full-stop. This is because tags with full-stops cannot be read using target selectors. {NoGravity:1b,Tags:"2_0",GM4,CustomName:GM4_desireLines} This armorstand is used by the uninstaller code and will be used to support potential future diagnostic modules that check for the presence of the module; its version and location; and affect the module in other ways. Entities If an entity is used for marking or placeholding and the name isn't visible to the user, the GM4_ prefix should be used. Keep marker entities' names clear and unique. Clocks 20hz clocks should use a repeating_command_block to function. Any other clock should use a falling_block redstone block clock. The sand's vertical velocity should be used to modify the timing of the hopper clock with a default velocity of 0.0,0.35,0.0 to be used (giving it the same cycle time as a regular hopper clock). If a contraption doesn't need to run on a 20hz clock it is required for it to be on a FallingSand clock. Place a redstone block on top of a command block with the following command inside to obtain a FallingSand clock. summon falling_block ~ ~0.5 ~ {Block:redstone_block,Motion:0.0,0.35,0.0} Tags Tagging should be used where appropriate to reduce the number of scoreboards in the world. Should be camelCase with a "GM4_" prefix. Currently used tags: 1.9+ modules 1.9 modules take the shape of a wall 16 command blocks long in the X direction, up to 2 command blocks wide in the Z direction and spiralling or snaking upwards from the start clock in the Y. They should move from their start point in the positive X until the module is 16 command blocks long (excluding the sign on the end but including the clock command block). Once the module is 16 command blocks long it should turn clockwise back on itself until it reaches the start X coordinate, from there it should continue to snake or spiral upwards in the positive Y. A module should never be longer than 16 in the X (excluding the sign) and no wider than 2 in the Z. 1-Click Install 1-clicks should spawn the structure 1 block off of the execution command block in the positive x and z, level with the install command-block's y coordinate. 1 Click CreationCategory:Tutorials Category:References